package com.binvshe.binvshe.activity;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * Created by Zoi.
 * E-mail：KyluZoi@gmail.com
 * 2016/9/24
 * 门票日期列表
 */

public class ActivityDateEntity implements Parcelable {

    /**
     * id : 26
     * activity_id : 4
     * through : false
     * name : 10月01日 星期六
     * date : 1475251200000
     */

    private int id;
    private int activity_id;
    private boolean through;
    private String name;
    private long date;



    private boolean isSelect=false;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getActivity_id() {
        return activity_id;
    }

    public void setActivity_id(int activity_id) {
        this.activity_id = activity_id;
    }

    public boolean isThrough() {
        return through;
    }

    public void setThrough(boolean through) {
        this.through = through;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getDate() {
        return date;
    }

    public void setDate(long date) {
        this.date = date;
    }
    public boolean isSelect() {
        return isSelect;
    }

    public void setSelect(boolean select) {
        isSelect = select;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(this.id);
        dest.writeInt(this.activity_id);
        dest.writeByte(through ? (byte) 1 : (byte) 0);
        dest.writeString(this.name);
        dest.writeLong(this.date);
        dest.writeByte(isSelect ? (byte) 1 : (byte) 0);
    }

    public ActivityDateEntity() {
    }

    protected ActivityDateEntity(Parcel in) {
        this.id = in.readInt();
        this.activity_id = in.readInt();
        this.through = in.readByte() != 0;
        this.name = in.readString();
        this.date = in.readLong();
        this.isSelect = in.readByte() != 0;
    }

    public static final Parcelable.Creator<ActivityDateEntity> CREATOR = new Parcelable.Creator<ActivityDateEntity>() {
        public ActivityDateEntity createFromParcel(Parcel source) {
            return new ActivityDateEntity(source);
        }

        public ActivityDateEntity[] newArray(int size) {
            return new ActivityDateEntity[size];
        }
    };
}
